
namespace System.Runtime.Remoting.ViewService
{
    public interface IRemoteEvent : IRemoteObject { event EventHandler Event; }

    [Serializable]
    public class RemoteEvent : IRemoteEvent
    {
        public event EventHandler Event;

        public string Name { get; private set; }

        public RemoteEvent(string Name) { this.Name = Name; }

        public void Invoke() { Event.FastStart(this, EventArgs.Empty); }
        public void Invoke(EventArgs args) { Event.FastStart(this, args); }
        public void Invoke(object sender, EventArgs args) { Event.FastStart(sender, args); }
    }
}